<template>
	<view :style="{width}" style="overflow: hidden;margin-top: 15rpx;">
		
		
		<view v-if="this.images.length <= 4" style="display: flex;width: 100%;overflow: hidden;flex-wrap: wrap;">
			<image @click="preimage(k)" v-for="(item,k) in images" :src="$store.state.common.systemInfo.fileurl + item" style="width: 300rpx;margin-right: 8rpx;margin-bottom: 8rpx;" mode="widthFix"></image>
		</view>
		
		<view v-if="this.images.length > 4" style="display: flex;width: 100%;overflow: hidden;flex-wrap: wrap;">
			<image @click="preimage(k)" v-for="(item,k) in images" :src="$store.state.common.systemInfo.fileurl + item" style="width: 190rpx;margin-right: 8rpx;margin-bottom: 8rpx;" mode="widthFix"></image>
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				length:0
			}
		},
		props: {
			images: {
				type: Array,
				default: () => {
					return []
				}
			},
			width:{
				type:String | Number,
				default:'620rpx'
			}
		},
		mounted() {
			
		},
		methods:{
			preimage:function(k){
				const _this = this
				uni.previewImage({
					urls:this.images.map(e=>{
						return _this.$store.state.common.systemInfo.fileurl + e
					}),
					current:k
				})
			}
		}
	}
</script>

<style>
</style>